Matthias Clasen [Wed, 14 Oct 2020 19:07:09 +0000 (15:07 -0400)]
Merge branch 'wip/baedert/for-master'
Leaving out the gboolean -> bool change.
Timm Bäder [Tue, 13 Oct 2020 07:58:40 +0000 (09:58 +0200)]
pixbufutils: Pass calculated height value along
Timm Bäder [Tue, 13 Oct 2020 07:56:48 +0000 (09:56 +0200)]
main: Make sure we don't leak axes
Mainly a change to appease the static analyzer
Timm Bäder [Tue, 13 Oct 2020 07:56:32 +0000 (09:56 +0200)]
infobar: Remove unused include
Timm Bäder [Tue, 13 Oct 2020 03:36:03 +0000 (05:36 +0200)]
overlay: Remove empty finalize implementation
Timm Bäder [Sun, 11 Oct 2020 18:11:39 +0000 (20:11 +0200)]
gtk4-demo: Add missing margin-bottom
This was setting margin-end twice
Timm Bäder [Sun, 11 Oct 2020 17:59:00 +0000 (19:59 +0200)]
gtk4-demo: Remove connection to removed signal
Timm Bäder [Sun, 11 Oct 2020 17:56:22 +0000 (19:56 +0200)]
stacksidebar: Fold some functions into their only callers
Timm Bäder [Sun, 11 Oct 2020 17:30:15 +0000 (19:30 +0200)]
stacksidebar: Set GtkListBox:show-separators
Instead of doing this ourselves
Timm Bäder [Sun, 11 Oct 2020 16:57:10 +0000 (18:57 +0200)]
frame: Remove need_resize logic
gtk_widget_set_parent() will queue a resize anyway.
Timm Bäder [Sun, 11 Oct 2020 10:21:54 +0000 (12:21 +0200)]
windowcontrols: gtk_widget_get_root() can return NULL
Timm Bäder [Sun, 11 Oct 2020 10:17:53 +0000 (12:17 +0200)]
windowcontrols: decoration-layout is nullable
Timm Bäder [Sun, 11 Oct 2020 09:58:11 +0000 (11:58 +0200)]
stylecontext: Remove some unnused includes
Timm Bäder [Sun, 11 Oct 2020 09:55:04 +0000 (11:55 +0200)]
snapshot: Refactor some device code
Make a bit clearer what this does.
Timm Bäder [Sun, 11 Oct 2020 09:51:19 +0000 (11:51 +0200)]
Remove unneeded gtkstylecontext.h includes
Timm Bäder [Sun, 11 Oct 2020 09:40:31 +0000 (11:40 +0200)]
stylecontext: Remove render_insertion_cursor()
This is unused and there already is a snapshot alternative.
Timm Bäder [Sun, 11 Oct 2020 08:26:25 +0000 (10:26 +0200)]
widget: Remove gtk_widget_list_devices() from private header
Timm Bäder [Sun, 11 Oct 2020 08:22:20 +0000 (10:22 +0200)]
window: Remove unused struct member
Timm Bäder [Sun, 11 Oct 2020 08:17:18 +0000 (10:17 +0200)]
widget: Slightly update opacity docs
Timm Bäder [Sat, 10 Oct 2020 18:20:38 +0000 (20:20 +0200)]
gl renderer: Fix private function name
It's a GskGLRenderer, not a GskGLRender
Timm Bäder [Sat, 10 Oct 2020 17:57:29 +0000 (19:57 +0200)]
gl renderer: Add more scale_x/scale_y code
We really need all of this to be aware of both dimensions of course...
Timm Bäder [Sat, 10 Oct 2020 17:50:21 +0000 (19:50 +0200)]
gl renderer: Remove two unused uniforms
Timm Bäder [Sat, 10 Oct 2020 17:39:33 +0000 (19:39 +0200)]
gl renderer: return empty texture for too small blurred nodes
Timm Bäder [Sat, 10 Oct 2020 17:03:02 +0000 (19:03 +0200)]
gl renderer: Use op builder to render flipped texture
Otherwise, we don't know about the uniform state
Timm Bäder [Sat, 10 Oct 2020 17:02:43 +0000 (19:02 +0200)]
showrendernode: Plug GOptionContext memory leak
Timm Bäder [Sat, 10 Oct 2020 16:40:03 +0000 (18:40 +0200)]
gl renderer: Remove unused parameter
Timm Bäder [Sat, 10 Oct 2020 15:17:43 +0000 (17:17 +0200)]
filechooserwidget: Cosmetics
Timm Bäder [Sat, 10 Oct 2020 15:13:50 +0000 (17:13 +0200)]
testfilechooser: Stop listening to ::selection-changed
Doesn't exist anymore.
Timm Bäder [Sat, 10 Oct 2020 07:16:30 +0000 (09:16 +0200)]
gl renderer: Use nearest filtering for textures in render_texture()
Makes the output in the node editor a bit more bearable.
Timm Bäder [Sat, 10 Oct 2020 06:43:52 +0000 (08:43 +0200)]
build: Only add -Wcast-align for gcc
Either we or clang needs to get its shit together about this warning.
But using it during development with clang just makes actually usable
warnings get lost in a flood of -Wcast-align warnings.
Timm Bäder [Sat, 10 Oct 2020 06:42:53 +0000 (08:42 +0200)]
vulkan: Remove double initialization
Clang said:
../gsk/vulkan/gskvulkanrenderpass.c:250:5: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.render.node = node
^~~~~~~~~~~~~~~~~~~
../gsk/vulkan/gskvulkanrenderpass.c:249:13: note: previous initialization is here
.type = GSK_VULKAN_OP_FALLBACK,
^~~~~~~~~~~~~~~~~~~~~~
Timm Bäder [Fri, 9 Oct 2020 16:20:28 +0000 (18:20 +0200)]
gl renderer: Avoid some code duplication
Timm Bäder [Thu, 8 Oct 2020 16:00:36 +0000 (18:00 +0200)]
gl renderer: Flip texture in render_texture()
Timm Bäder [Thu, 8 Oct 2020 15:58:37 +0000 (17:58 +0200)]
glsl: Add a comment
Timm Bäder [Thu, 8 Oct 2020 03:56:26 +0000 (05:56 +0200)]
gtkbuilder: Remove pointless function prototype
Timm Bäder [Sat, 3 Oct 2020 09:48:36 +0000 (11:48 +0200)]
gdkgl: Remove flipping when downloading GL texture
This fix is correct and fixes:
1) GL textures being upside down in the inspector. They are getting
downloaded because they've been created in a different GL context
2) GL textures being upside down in the cairo renderer (same reason)
However, it breaks the testsuite. We do the flipping via the projection
matrix, but most of the shaders don't care about that.
Timm Bäder [Thu, 1 Oct 2020 07:47:34 +0000 (09:47 +0200)]
gdkgl: Stop getting the clip region from cairo
Unused
Timm Bäder [Thu, 1 Oct 2020 07:38:39 +0000 (09:38 +0200)]
gl renderer: simplify ->render() implementation a bit
We already use self->scale_factor when initialized whole_surface,
so set self->scale_factor first.
Timm Bäder [Thu, 1 Oct 2020 06:39:37 +0000 (08:39 +0200)]
shaderbuilder: Print error message after source code
My terminal scrolls down, so showing the error message last makes sense.
Timm Bäder [Thu, 1 Oct 2020 06:39:19 +0000 (08:39 +0200)]
gl renderer: Add a helper to setup projection matrix
Timm Bäder [Thu, 1 Oct 2020 06:29:10 +0000 (08:29 +0200)]
gl renderer: Ignore rendering if accumulated opacity is too small
Timm Bäder [Thu, 1 Oct 2020 04:24:20 +0000 (06:24 +0200)]
gdkgl: Rename function
This returns the name of the shader type.
Timm Bäder [Thu, 1 Oct 2020 04:18:37 +0000 (06:18 +0200)]
unblurred outset shadow shader: Use premultiply()
Timm Bäder [Wed, 30 Sep 2020 04:00:50 +0000 (06:00 +0200)]
gl renderer: Use premultiply() in inset shadow shader`
Timm Bäder [Tue, 29 Sep 2020 17:54:50 +0000 (19:54 +0200)]
glarea demo: Add min size to gl area
Timm Bäder [Mon, 28 Sep 2020 16:39:01 +0000 (18:39 +0200)]
gdkgl: Remove unused cairo_get_matrix() call
Timm Bäder [Sat, 26 Sep 2020 08:12:33 +0000 (10:12 +0200)]
colorscale: Refactor creating the hue texture
Make this a bit shorter and don't call gtk_hsv_to_rgb in the inner
loop as that is unnecessary.
Timm Bäder [Sat, 26 Sep 2020 08:00:34 +0000 (10:00 +0200)]
colorplane: Remove (un)realize handlers
Creating the texture in realize() is unnecessary these days, since we
can just rely on size_allocate to do that.
Timm Bäder [Sat, 26 Sep 2020 07:59:27 +0000 (09:59 +0200)]
colorutils: Refactor hsv_to_rgb and fold into only caller
Timm Bäder [Sat, 26 Sep 2020 07:39:31 +0000 (09:39 +0200)]
colorplane: Refactor create_texture()
Create a R8G8B8 texture here so we don't waste memory and do work for
an alpha channel we don't care about.
Timm Bäder [Fri, 25 Sep 2020 19:31:49 +0000 (21:31 +0200)]
colorutils: Remove unused macro
Timm Bäder [Fri, 25 Sep 2020 19:11:37 +0000 (21:11 +0200)]
colorplane: Whitespace
Emmanuele Bassi [Mon, 12 Oct 2020 13:05:52 +0000 (14:05 +0100)]
Generate introspection for GdkWayland API
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
Emmanuele Bassi [Mon, 12 Oct 2020 13:04:13 +0000 (14:04 +0100)]
Add type annotations for GdkWayland API
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
Emmanuele Bassi [Mon, 12 Oct 2020 13:02:54 +0000 (14:02 +0100)]
Skip GdkWayland symbols that use wayland-client types
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
Aurimas Černius [Sun, 11 Oct 2020 14:25:23 +0000 (17:25 +0300)]
Updated Lithuanian translation
Christian Hergert [Sat, 10 Oct 2020 03:08:23 +0000 (20:08 -0700)]
macos: port gtk to GDK_WINDOWING_MACOS
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
Christian Hergert [Sat, 10 Oct 2020 03:05:20 +0000 (20:05 -0700)]
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
Christian Hergert [Sat, 10 Oct 2020 03:04:27 +0000 (20:04 -0700)]
gdk: remove quartz subdirectory from backends
Christian Hergert [Sat, 10 Oct 2020 03:03:52 +0000 (20:03 -0700)]
macos: add key equivalent helper
This is needed by quartz code in gtk/.
Christian Hergert [Sat, 10 Oct 2020 03:02:38 +0000 (20:02 -0700)]
macos: remove workaround for scroll delta
This gets handled differently in gtk/ and so we shouldn't translate it here.
Christian Hergert [Sat, 10 Oct 2020 03:02:18 +0000 (20:02 -0700)]
macos: track various changes in GDK
Christian Hergert [Sat, 10 Oct 2020 02:58:07 +0000 (19:58 -0700)]
macos: lookup NSEvent by translated GdkEvent
This will be needed by the quartz imcontext.
Christian Hergert [Sat, 10 Oct 2020 02:56:21 +0000 (19:56 -0700)]
macos: move input method names to private header
Piotr Drąg [Sat, 10 Oct 2020 10:45:14 +0000 (12:45 +0200)]
Update Polish translation
Marek Černocký [Sat, 10 Oct 2020 10:17:27 +0000 (12:17 +0200)]
Updated Czech translation
Matthias Clasen [Fri, 9 Oct 2020 11:51:57 +0000 (07:51 -0400)]
gtk-demo: Keep undisplayable resources out of view
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
Matthias Clasen [Fri, 9 Oct 2020 03:06:07 +0000 (23:06 -0400)]
Send focus events to the root
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes: #3240
Matthias Clasen [Fri, 9 Oct 2020 00:32:39 +0000 (20:32 -0400)]
window: Be more careful when looking for focus
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.
Matthias Clasen [Thu, 8 Oct 2020 23:23:23 +0000 (19:23 -0400)]
build: Require sysprof 3.38.0
We use sysprof_collector_request_counters, which
was introduced in sysprof 3.38.0.
Matthias Clasen [Thu, 8 Oct 2020 19:55:22 +0000 (15:55 -0400)]
gtk-demo: Ellipsize columns in the characters demo
some of the columns have uneven widths, causing them
to bounce around as you scroll. Ellipsize them and
give them a fixed with.
Matthias Clasen [Thu, 8 Oct 2020 18:13:19 +0000 (14:13 -0400)]
docs: Add more details to the migration guide
Add some details about GdkSurface and GtkWindow api changes.
Fixes: #3242
Jakub Steiner [Wed, 14 Oct 2020 07:36:06 +0000 (07:36 +0000)]
Merge branch 'wip/jimmac/sidebar-hover-selected-focus' into 'master'
Adwaita: selected:hover and focus:selected:hover states
Closes #3251
See merge request GNOME/gtk!2686
Jakub Steiner [Tue, 13 Oct 2020 19:27:17 +0000 (21:27 +0200)]
Adwaita: selected:hover and focus:selected:hover states
- getting pretty deep, but visually seems to make sense. Selected row hovers
increase contrast.
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/3251
Matthias Clasen [Tue, 13 Oct 2020 19:25:59 +0000 (19:25 +0000)]
Merge branch 'wip/carlosg/for-master' into 'master'
Cascade-close popovers by default
Closes #3200
See merge request GNOME/gtk!2685
Carlos Garnacho [Tue, 13 Oct 2020 13:51:36 +0000 (15:51 +0200)]
gtkmodelbutton: Drop special case to close GtkPopoverMenu
With ::cascade-popdown in place, this special case is not necessary
anymore.
Carlos Garnacho [Tue, 13 Oct 2020 12:58:13 +0000 (14:58 +0200)]
gtkpopover: Remove GtkPopoverMenu special case
Now that there's ::cascade-popdown, we don't need to treat
GtkPopoverMenu especially here.
Carlos Garnacho [Tue, 13 Oct 2020 12:26:41 +0000 (14:26 +0200)]
gtkpopover: Add cascade-popdown property/functions
And honor it in gtk_popover_popdown(). By default, a GtkPopover
pops down automatically if a child popover was closed, if this
property is FALSE, the popover will remain opened.
Matthias Clasen [Mon, 12 Oct 2020 14:39:39 +0000 (14:39 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Ebassi/for master
See merge request GNOME/gtk!2683
Emmanuele Bassi [Mon, 12 Oct 2020 13:05:52 +0000 (14:05 +0100)]
Generate introspection for GdkWayland API
Like we do for GdkX11. We can't use all of the public C API, but we can
expose enough type information to allow non-C developers to actually
check if they are running the Wayland GDK backend or not—plus some
additional Wayland-specific API.
Emmanuele Bassi [Mon, 12 Oct 2020 13:04:13 +0000 (14:04 +0100)]
Add type annotations for GdkWayland API
The GdkWayland API takes generic GDK types and performs a run time
check, which means we need to properly annotate the actual expected
type in order to have methods recognised as such.
Emmanuele Bassi [Mon, 12 Oct 2020 13:02:54 +0000 (14:02 +0100)]
Skip GdkWayland symbols that use wayland-client types
The wayland-client API does not have introspection annotations, so we
can't use these types anyway.
Aurimas Černius [Sun, 11 Oct 2020 14:25:23 +0000 (17:25 +0300)]
Updated Lithuanian translation
Matthias Clasen [Sat, 10 Oct 2020 11:55:01 +0000 (11:55 +0000)]
Merge branch 'wip/chergert/gdk-macos-fixes' into 'master'
various build fixes for GDK/GTK on macos
See merge request GNOME/gtk!2680
Piotr Drąg [Sat, 10 Oct 2020 10:45:14 +0000 (12:45 +0200)]
Update Polish translation
Marek Černocký [Sat, 10 Oct 2020 10:17:27 +0000 (12:17 +0200)]
Updated Czech translation
Christian Hergert [Sat, 10 Oct 2020 03:08:23 +0000 (20:08 -0700)]
macos: port gtk to GDK_WINDOWING_MACOS
For the various uses of GDK_WINDOWING_QUARTZ, we need to use
alternatives from GDK_WINDOWING_MACOS.
Some minor loss of functionality is here, such as icons sent with
application menus. That can certainly be added back at a future
point.
Christian Hergert [Sat, 10 Oct 2020 03:05:20 +0000 (20:05 -0700)]
gtk: use GDK_WINDOWING_MACOS in gentypefuncs.py
Christian Hergert [Sat, 10 Oct 2020 03:04:27 +0000 (20:04 -0700)]
gdk: remove quartz subdirectory from backends
Christian Hergert [Sat, 10 Oct 2020 03:03:52 +0000 (20:03 -0700)]
macos: add key equivalent helper
This is needed by quartz code in gtk/.
Christian Hergert [Sat, 10 Oct 2020 03:02:38 +0000 (20:02 -0700)]
macos: remove workaround for scroll delta
This gets handled differently in gtk/ and so we shouldn't translate it here.
Christian Hergert [Sat, 10 Oct 2020 03:02:18 +0000 (20:02 -0700)]
macos: track various changes in GDK
Christian Hergert [Sat, 10 Oct 2020 02:58:07 +0000 (19:58 -0700)]
macos: lookup NSEvent by translated GdkEvent
This will be needed by the quartz imcontext.
Christian Hergert [Sat, 10 Oct 2020 02:56:21 +0000 (19:56 -0700)]
macos: move input method names to private header
Christian Hergert [Sat, 10 Oct 2020 02:55:25 +0000 (19:55 -0700)]
demo: fix out of bounds array index usage
Matthias Clasen [Fri, 9 Oct 2020 13:35:57 +0000 (13:35 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master
Closes #3242 and #3240
See merge request GNOME/gtk!2679
Matthias Clasen [Fri, 9 Oct 2020 11:51:57 +0000 (07:51 -0400)]
gtk-demo: Keep undisplayable resources out of view
No point in showing an apologetic tab for a blob of binary data.
gtk4-demo shows the resources under /DEMONAME/ for each demo,
so move the data to /DEMONAME_data/.
Matthias Clasen [Fri, 9 Oct 2020 11:47:38 +0000 (11:47 +0000)]
Merge branch 'ebassi/for-master' into 'master'
Tone down a user visible message
See merge request GNOME/gtk!2678
Matthias Clasen [Fri, 9 Oct 2020 03:06:07 +0000 (23:06 -0400)]
Send focus events to the root
We are not propagating focus change events, and that is the only
place where we are listening for focus change events. If GtkWindow
does not see focus-in events for its popovers, we end up with
inadvertendly inactive windows.
Fixes: #3240
Matthias Clasen [Fri, 9 Oct 2020 00:32:39 +0000 (20:32 -0400)]
window: Be more careful when looking for focus
When passing focus up to a parent, make sure the
newly chosen focus widget actually accepts the focus.